﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Hospitals/Master/HospitalsMaster.Master" AutoEventWireup="true" CodeBehind="BulidPaymentManage.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.ProcureManage.BulidPaymentManage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">结算单管理</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td align="right" style="display:none;">
                    <asp:Label ID="Label1" runat="server" Text="结算单号："></asp:Label>
                </td>
                <td align="left" style="display:none;">
                    <asp:TextBox ID="txtProjectNo" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="lblProjectName" runat="server" Text="结算单名称："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtDistriPlanName" runat="server"></asp:TextBox>
                </td>
                <td align="right" style="display:none;">
                    <asp:Label ID="Label4" runat="server" Text="结算单状态："></asp:Label>
                </td>
                <td align="left" style="display:none;">
                    <asp:DropDownList ID="ddlPayStatus" runat="server">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="0">未确认</asp:ListItem>
                        <asp:ListItem Value="1">已确认</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="Label2" runat="server" Text="医疗机构名称："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtHospitalName" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Label ID="Label3" runat="server" Text="配送企业名称："></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtCompanyName" runat="server"></asp:TextBox>
                </td>
                <td></td>
                <td align="left">
                    <hz:HzButton ID="btnSelect" runat="server" Text="查  询" CssClass="searchbtn" Width="70px"
                        OnClick="btnSelect_Click" />
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwProcurementProjectList" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="InvoicePaySerialID" EmptyDataText="暂无符合条件的数据！"
        OnRowDataBound="gvwProcurementProjectList_RowDataBound" 
        onselectedindexchanged="gvwProcurementProjectList_SelectedIndexChanged" 
        onrowediting="gvwProcurementProjectList_RowEditing" 
        onrowcancelingedit="gvwProcurementProjectList_RowCancelingEdit" 
        onrowupdating="gvwProcurementProjectList_RowUpdating">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex + 1 + AspNetPager1.PageSize * (AspNetPager1.CurrentPageIndex-1)%>
                </ItemTemplate>
                <HeaderStyle Width="30px" />
            </asp:TemplateField>
           <%-- <asp:TemplateField HeaderText="结算单号" >
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblInvoicePayNo" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayNo")) %>'></asp:Label>
                </ItemTemplate>
                 <EditItemTemplate>
                    <asp:TextBox ID="txtInvoicePayNo" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayNo")) %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="结算单名称">
                <ItemTemplate>
                    <a href='../../Hospitals/Collection/InvoiceList.aspx?ID=<%#Eval("InvoicePaySerialID") %>&PName=<%#HttpUtility.UrlEncode(Eval("InvoicePayName").ToString()) %>'>
                        <asp:Label runat="server" ID="InvoicePayName" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayName")) %>'
                            ToolTip="点击进入查看结算单详细信息"></asp:Label></a>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtgvInvoicePayName" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayName")) %>'></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="医疗机构名称">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblHospitalName" Text='<%#(DataBinder.Eval(Container,"DataItem.HospitalName")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="配送企业">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblCompanyName_PS" Text='<%#(DataBinder.Eval(Container,"DataItem.CompanyName_PS")) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        <%--    <asp:TemplateField HeaderText="注册号" Visible="false">
                <ItemTemplate>
                    <a href='#'>
                        <asp:Label runat="server" ID="lblCompanyID_PS" Text='<%#(DataBinder.Eval(Container,"DataItem.CompanyID_PS")) %>'></asp:Label></a>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="应付金额">
                  <ItemTemplate>
                      <asp:Label runat="server" ID="lbPayAmount" Text='<%#(DataBinder.Eval(Container,"DataItem.PayAmount")) %>'></asp:Label>
                  </ItemTemplate>
            </asp:TemplateField>
            <%--<asp:BoundField DataField="ActualAmount" HeaderText="实付金额" DataFormatString="{0:F2}" />--%>
            <asp:TemplateField HeaderText="实付金额">
                  <ItemTemplate>
                      <asp:Label runat="server" ID="lbActualAmount" Text='<%#(DataBinder.Eval(Container,"DataItem.ActualAmount")) %>'></asp:Label>
                  </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="结算时间">
                  <ItemTemplate>
                      <asp:Label runat="server" ID="lblInvoicePayTime" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayTime","{0:yyyy-MM-dd}")) %>'></asp:Label>
                  </ItemTemplate>
                  <EditItemTemplate>
                    <asp:TextBox ID="txtInvoicePayTime" runat="server" Text='<%#(DataBinder.Eval(Container,"DataItem.InvoicePayTime","{0:yyyy-MM-dd}")) %>'
                        MaxLength="10" onFocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" Width="62px"></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="结算单状态" Visible="false">
                <ItemTemplate>
                    <%--                    <asp:Label ID="lblProcureEndTime" runat="server" Text='<%#Eval("PayStatus").ToString()=="0"?"已提交未确认":"已确认" %>'></asp:Label>
--%>
                    <asp:Label ID="lblPayStatus" runat="server" Text='<%#Eval("PayStatus")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
                       <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton ID="lbnMod" runat="server" Text="修改" CommandName="Edit" OperateType="编辑" />
                </ItemTemplate>
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate" CssClass="innerbtn" runat="server" CausesValidation="True" OperateType="编辑"
                        CommandName="Update" Text="更新" /><hz:HzLinkButton ID="lbnCancel" CssClass="innerbtn"
                            runat="server" CausesValidation="False" CommandName="Cancel" Text="取消" /></EditItemTemplate>
                <ItemStyle Width="80px" />
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <div class="page">
        <webdiyer:AspNetPager ID="AspNetPager1" runat="server" 
            onpagechanged="AspNetPager1_PageChanged">
        </webdiyer:AspNetPager>
    </div>
    <div class="listctrl">
<hz:HzButton ID="btnExport" runat="server" Text="导出Excel" CssClass="btn" ToolTip="导出Excel"
                        OnClick="btnExport_Click" /></div>
    <div class="listip">
        <ul>
            <li>提示:<span> </span></li>
        </ul>
    </div>
    <div class="listctrl">
    </div>
</asp:Content>
